{{include template('public/header','admin')}}
<body>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <div class="page-header">
                    <a onclick="layer_open('添加投票', '/vote/vote/add', '800', '650')"  class="btn btn-primary bar-btn"><i class="fa fa-fw fa-plus"></i>添加投票</a>
                </div>
                <div class="search">

                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <form method="post"  class="form-inline" role="form">
                    <table class="table table-condensed table-hover table-striped tablesorter table-fixed table-selectable">
                        <thead>
                            <tr>
                            <tr class="text-c">
                                <th>标题</th>
                                <th>投票数</th>
                                <th>开始时间</th>
                                <th>结束时间</th>
                                <th>奖励积分</th>
                                <th>投票模板</th>
                                <th>是否启用</th>
                                <th>发表时间</th>
                                <th>管理操作</th>
                            </tr>
                            </tr>
                        </thead>
                        <tbody>
                            {{foreach $items as $item}}
                            <tr>
                                <td ><a href="/vote/index/show/?subjectid={{$item.subjectid}}&siteid={{$item.siteid}}&show_type=1" target="_blank">{{$item.subject}}</a> <font color=red>{{if $item.enabled=='0'}}锁定{{/if}}</font></td>
                                <td >{{$item.votenumber}}</td>
                                <td >{{$item.fromdate}}</td>
                                <td >{{$item.todate}}</td>
                                <td >{{$item.credit}}</td>
                                <td >{{$item.template}}</td>
                                <td >{{update_status('/vote/vote','vote','subjectid',$item.subjectid,'enabled',$item.enabled)}}</td>
                                <td >{{date("Y-m-d H:i:s",$item.addtime)}}</td>
                                <td>
                                    <a href="javascript:;" onclick="layer_open('统计投票', '/vote/vote/statistics/?subjectid={{$item.subjectid}}', '800', '500')"  class="btn btn-warning btn-xs">统计</a>
                                    <a href="javascript:;" onclick="layer_open('调用JS代码', '/vote/vote/public_call/?subjectid={{$item.subjectid}}', '800', '500')"  class="btn btn-warning btn-xs">调用JS代码</a>
                                    <a href="javascript:;" onclick="layer_open('修改投票', '/vote/vote/update/?subjectid={{$item.subjectid}}', '800', '500')"  class="btn btn-warning btn-xs">修改</a>
                                    <a href="javascript:;" onclick="layer_del('/vote/vote/delete/?subjectid={{$item.subjectid}}')"  class="btn btn-danger btn-xs">删除</a>
                                </td>
                            </tr>
                            {{/foreach}}
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
